Add Drop::pin_drop for pinned drops#144537
Add Drop::pin_drop for pinned drops#144537frank-king wants to merge 2 commits intorust-lang:mainfrom
Drop::pin_drop for pinned drops#144537Conversation
362f769 to
1497185
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
1497185 to
9b7201c
Compare
Drop::pin_drop for !Unpin typesDrop::pin_drop for pinned drops
This comment has been minimized.
This comment has been minimized.
d6ddfcf to
7b4bb5c
Compare
This comment has been minimized.
This comment has been minimized.
7b4bb5c to
36ca628
Compare
This comment has been minimized.
This comment has been minimized.
36ca628 to
252d6fc
Compare
This comment has been minimized.
This comment has been minimized.
|
The CI failed because |
252d6fc to
02b0b0d
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
02b0b0d to
7660d88
Compare
This comment has been minimized.
This comment has been minimized.
7660d88 to
33e3124
Compare
This comment has been minimized.
This comment has been minimized.
9618d10 to
c3e34d5
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
9b07833 to
fa600c5
Compare
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_hir/src/attrs |
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Hi @frank-king, from what I can see the latest CI is green now, including the previous lint/linkchecker-related issue. Could you please confirm that this part is fully resolved on your side as well? I also plan to work on the remaining unchecked item in the PR description:
I’ll prepare that as a follow-up PR so this |
|
@rustbot ready |
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
Add `Drop::pin_drop` for pinned drops This PR is part of the `pin_ergonomics` experiment (the tracking issue is #130494). It allows implementing `Drop` with a pinned `self` receiver, which is required for safe pin-projection. Implementations: - [x] At least and at most one of `drop` and `pin_drop` should be implemented. - [x] No direct call of `drop` or `pin_drop`. They should only be called by the drop glue. - [x] `pin_drop` must and must only be used with types that support pin-projection (i.e. types with `#[pin_v2]`). - [ ] Allows writing `fn drop(&pin mut self)` and desugars to `fn pin_drop(&pin mut self)`. (Will be in the next PRs)
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for 13a5a99 failed: CI. Failed job:
|
|
@bors retry |
|
@frank-king I opened a stacked follow-up PR for the remaining sugar item: It implements The implementation keeps the remap at resolver/HIR, lowering time: the resolver recognises the sugar only for the actual I also added coverage for hosted Happy to adjust the approach if you would prefer the sugar to be handled at a different compiler boundary. |
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for edafd5c failed: CI. Failed job:
|
View all comments
This PR is part of the
pin_ergonomicsexperiment (the tracking issue is #130494). It allows implementingDropwith a pinnedselfreceiver, which is required for safe pin-projection.Implementations:
dropandpin_dropshould be implemented.droporpin_drop. They should only be called by the drop glue.pin_dropmust and must only be used with types that support pin-projection (i.e. types with#[pin_v2]).fn drop(&pin mut self)and desugars tofn pin_drop(&pin mut self). (Will be in the next PRs)